#ifndef SQLTEST_H
#define SQLTEST_H
#include "dbpage.h"

#include <src/commom/basestylewidget.h>
#include <QStackedWidget>
#include <QWidget>
#include <src/commom/staticbutton.h>
#include <QTableView>
class StaticButton;
class sqlTest : public BaseStyleWidget
{
    Q_OBJECT
public:
    explicit sqlTest(QWidget *parent = nullptr);
private:
    void initUI();
    void initConnect();
private slots:
    void initForm();
    void on_btnSelect_clicked();

public slots:
    void setStackedButton(int index);
    void cleanSql();

signals:
    void payinsureClicked();
    void securityClicked();
    void examineClicked();
    void viewClicked();
private:
    QStackedWidget *m_stacked;
    QStackedWidget *m_stacked2;
    QStackedWidget *m_stacked3;
    QStackedWidget *m_stacked4;
    QStackedWidget *m_stacked5;
    QTableView     *m_view;
    StaticButton *Button;
    StaticButton *Button2;
    StaticButton *Button3;
    StaticButton *Button4;
    StaticButton *Button5;
    QLabel *Label;
    QLabel *Label2;
    QLabel *Label3;
    QLabel *Label4;
    QLabel *Label5;
    QLabel *Label6;
    QLabel *Label7;
    QList<QString> columnNames; //字段名集合
    QList<int> columnWidths;    //字段宽度集合
    DbPage *dbPage;             //数据库翻页类

    QString tableName;          //表名称
    QString countName;          //统计行数字段名称

};

#endif // SQLTEST_H
